package org.erepublik.company.thread;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.erepublik.company.product.House;
import org.erepublik.company.scanner.HousesScanner;

public class HouseListener  implements ServletContextListener {

    public void contextDestroyed(ServletContextEvent arg0) {
    }

    public void contextInitialized(ServletContextEvent arg0) {
        System.out.println("odpalam watek updatujacy domy...");
        ProductUpdater<House> foodUpdater = new ProductUpdater<House>("house", 1000*60*60, new HousesScanner());
        foodUpdater.start();
    }

}
